<script type="text/javascript" charset="utf-8"
	src="https://gw.alipayobjects.com/os/rmsportal/xsxusXNIcXwiGqtNiyOd.js"
	chat_url="https://cschat-ccs.aliyun.com/index.htm"
	logo_src="https://i.alipayobjects.com/e/201401/1tdi7nR70h.png"
	logo_position="rt"
	tntInstId="_2ZRod5E&scene=SCE00011494">
</script>
<template>
	<view>
		<!-- <u-navbar title="云课堂"></u-navbar> -->
		<view
			style="padding-top: 12rpx;width: 100%;display: flex;align-items: flex-start;background: #fff;padding: 36rpx 24rpx;box-sizing: border-box;">
			<view>
				<image :src="info.userHead" style="width: 200rpx;height: 200rpx;"></image>
			</view>
			<view style="flex: 1;display: flex;flex-direction: column;">
				<view style="width:100%;display: flex;align-items: center;padding-left: 20rpx; box-sizing: border-box;">
					<view style="flex: 1;font-size: 32rpx; font-weight: bold;">{{info.userName}}</view>
					<view @click="service">
						<image src="./myicon/kefu.png" style="margin-left: 20rpx; width: 60rpx;height: 60rpx;"></image>
					</view>
					<view>
						<image src="./myicon/lingdang.png" style="margin-left: 20rpx; width: 60rpx;height: 60rpx;">
						</image>
					</view>
				</view>
				<!-- <view
					style="width: 100%;display: flex;align-items: center;justify-content: space-between;padding:20rpx; margin-top: 30rpx;">
					<view style="display: flex;align-items: center;justify-content: center;">
						<image src="./myicon/time.png" style="width:30rpx;height: 30rpx;"></image>
						<text>我的学时 {{info.studyHour || 0}}</text>
					</view>

					<view style="display: flex;align-items: center;justify-content: center;" @click="goCredit">
						<image src="./myicon/star.png" style="width:30rpx;height: 30rpx;"></image>我的学分
						{{info.studyScore || 0}}
					</view>
				</view> -->
			</view>
		</view>
		<view class="my-center-menu"
			style="display: flex;flex-direction: column;justify-content: center;background: #FFFFFF;margin-top: 36rpx;padding: 0 24rpx;box-sizing: border-box;font-size: 32rpx;">
			<view
				style="width: 100%;border-bottom: 1px solid #dedede; height: 112rpx;display: flex;align-items: center;"
				@click="goMyCourse()">
				<image src="./myicon/my1.png" style="width: 48rpx;height: 48rpx;"></image> 我的课程
			</view>
			<view
				style="width: 100%;border-bottom: 1px solid #dedede; height: 112rpx;display: flex;align-items: center;"
				@click="goMyexam()">
				<image src="./myicon/my2.png" style="width: 48rpx;height: 48rpx;"></image> 我的考试
			</view>
			<view
				style="width: 100%;border-bottom: 1px solid #dedede; height: 112rpx;display: flex;align-items: center;"
				@click="goMyComment()">
				<image src="./myicon/my3.png" style="width: 48rpx;height: 48rpx;"></image> 我的评论
			</view>
			<!-- <view style="width: 100%;border-bottom: 1px solid #dedede; height: 112rpx;display: flex;align-items: center;">
				<image src="./myicon/my4.png" style="width: 48rpx;height: 48rpx;"></image> 学习档案
			</view> -->
			<view
				style="width: 100%;border-bottom: 1px solid #dedede; height: 112rpx;display: flex;align-items: center;"
				@click="goMycertificate()">
				<image src="./myicon/my5.png" style="width: 48rpx;height: 48rpx;"></image> 我的证书
			</view>


		</view>
		<tabs active="4" />
	</view>
</template>

<script>
	import tabs from '../../components/tabs/tabs.vue'
	export default {
		components: {
			tabs
		},
		data() {
			return {
				info: {}
			}
		},
		onLoad() {
			//var player = new prismplayer({id:"J_prismPlayer",autoplay:false,width:"100%",vid:"${vid}",playauth:"${playAuth}",});
			this.initInfoData()
		},
		methods: {
			service(){
				location.href = "https://cschat-ccs.aliyun.com/index.htm?tntInstId=_2ZRod5E&scene=SCE00011494"
			},
			initInfoData() {
				this.$http.getUserStudyInfo().then(res => {
					this.info = res.data || {}
					console.log(this.info)
				})
			},
			goMyexam() {
				console.log(1111)
				uni.navigateTo({
					url: '../exam/myExam'
				})
			},
			goMyCourse() {
				uni.navigateTo({
					url: '../course/my/my'
				})
			},
			goMyComment() {
				uni.navigateTo({
					url: '../comment/comment'
				})
			},
			goMycertificate() {
				uni.navigateTo({
					url: '../mycertificate/mycertificate'
				})
			},
			goCredit() {
				uni.navigateTo({
					url: '../credit/credit'
				})
			}
		}
	}
</script>

<style>

</style>
